package com.zbkj.dal.feign.req;

import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.List;

/**
 * @author JXY
 * @date 2024/03/21
 */
@Data
public class WeWorkUpdateUserReq {
    @JsonProperty("userid")
    private String userId;
    private String name;
    private String alias;
    private String mobile;
    private List<Integer> department;
    private List<Integer> order;
    @JsonProperty("is_leader_in_dept")
    private List<Integer> isLeaderInDept;
    @JsonProperty("main_department")
    private Integer mainDepartment;
    private String position;
    private Integer gender;
    private String email;
    private String telephone;
    @JsonProperty("avatar_mediaid")
    private String avatar;
    private Integer enable;
    private Extattr extattr;
    @JsonProperty("to_invite")
    private Boolean toInvite;
    private String address;
    @JsonProperty("external_profile")
    private ExternalProfile externalProfile;
    @JsonProperty("external_position")
    private String externalPosition;

    @Data
    public static class Extattr {
        private List<ExternalAttr> attrs;
    }
    @Data
    public static class ExternalProfile {
        @JsonProperty("external_corp_name")
        private String externalCorpName;
        @JsonProperty("external_attr")
        private List<ExternalAttr> externalAttr;
    }
    @Data
    public static class ExternalAttr {
        private Integer type;
        private String name;
        private Text text;
        private Web web;
        @JsonProperty("miniprogram")
        private MiniProgram miniProgram;
    }
    @Data
    @NoArgsConstructor
    @AllArgsConstructor
    public static class Text {
        private String value;
    }
    @NoArgsConstructor
    @AllArgsConstructor
    @Data
    public static class Web {
        private String url;
        private String title;
    }
    @NoArgsConstructor
    @AllArgsConstructor
    @Data
    public static class MiniProgram {
        @JsonProperty("appid")
        private String appId;
        @JsonProperty("pagepath")
        private String pagePath;
        private String title;
    }
}
